package cn.hy.service;

import cn.hutool.core.bean.BeanUtil;
import cn.hy.entity.Goods;
import cn.hy.mapper.GoodsMapper;
import cn.hy.vo.GoodsVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Resource
    private GoodsMapper goodsMapper;

    @Override
    public List<GoodsVo> list() {
        List<Goods> goods = goodsMapper.selectByExample(null);
        return BeanUtil.copyToList(goods, GoodsVo.class);
    }

}
